Welcome to the ViewIt Demo This program is packed with information about ViewIt and other programming tools distributed by FaceWare. • If you are new to FaceWare and would like to know why you should consider using ViewIt, press the Why ViewIt? button below. • If you would like to know more about the other tools sold by FaceWare, press the "Show Product List" button. • If you would like to know more about programming with ViewIt or other FaceWare tools, see the "Startup" menu in the "ViewIt On-Line Help" window. • If you have purchased ViewIt or have the shareware version of ViewIt and would like to begin programming, first read all of the following introductory notes: 1. Contact Us If You Need Further Help If you are a registered owner of the latest version of ViewIt and have any problems using ViewIt, you can contact us directly for technical help: USA: 217-328-5842, M-F, 9AM-5PM Central (Illinois) Europe: [+44]-(0)993-89-1407, M-F, 9AM-9PM GMT (England) AppleLink: D1323 Internet: D1323@APPLELINK.APPLE.COM Also note that ViewIt's documentation and features are constantly being improved, so we would like to hear from you (whether you own ViewIt or not) if you have suggestions for improving ViewIt or its documentation. 2. The Manuals Are On-Line The ViewIt product includes the ViewIt, FaceIt, and UtilIt modules. Each of these includes a "manual" or "programmer's guide" (stored as TEXT resources in the FaceWare file) that is available on-line when editing a ViewIt window. You can also optionally have this help displayed in a modeless window within your programs (see the "ViewIt On-Line Help" window behind this one). The programming guides and all other on-line help can be printed by choosing "Print" or "Print All" to produce printed manuals (most programmers do this once). 3. Try ViewIt's On-Line Editing As an example of editing a ViewIt window, put this window into edit mode by pressing Option-⌘-Shift. Try it now (pressing the Enter key exits edit mode). The bar that now appears at the bottom of this window has a file icon at the left. Press this icon to pop up a File menu. The "ViewIt Help" item in this menu opens the main "ViewIt On-Line Help" window (or brings an existing one forward) that contains the ViewIt, FaceIt, and UtilIt programming guides. 4. Read "Startup" Topics First The "Startup" menu in the ViewIt Help window opens help topics that should be read before any other help. These startup topics define basic concepts, present an example of the minimum code required to open a ViewIt window in a FaceIt-based program, and discuss how to start new projects or adapt existing programs for use with ViewIt and other modules. 5. Read "Editing" Help To Learn About Editing Learning to use ViewIt consists of two interrelated tasks: (1) learning to use on-line editing to create and edit ViewIt windows, and (2) learning about the code needed to open, manage, and close ViewIt windows. The first of these tasks is described in the "Editing" topic within the ViewIt Guide. You should take time to read this topic since it contains tips and shortcuts that you are not likely to discover by experimentation. 6. Decide How You Want To Use ViewIt ViewIt windows can be made to work within any Mac programming environment. This flexibility is made possible by our support for 3 different levels of use: (1) the use of modal ViewIt windows within isolated sections of any program, (2) the use of FaceIt to handle raw events, including those from modeless windows, and (3) the use of a special version of FaceIt to mix modeless event handling with the event handling in existing programs that have their own windows. (If the terms "modal" and "modeless" are unfamiliar, see the "Windows" topic in the ViewIt Guide.) • Level 1: Adding Modal ViewIt Windows If you are only interested in adding modal ViewIt windows to existing programs, then you can start by concentrating on the "Windows" topic in the ViewIt Guide, which deals with the initialization and use of modal ViewIt windows in programs. At this level you can ignore most info in the FaceIt Guide since the ViewIt windows that you'll be using are opened and closed within isolated sections of your program code. WARNING: If using ViewIt without FaceIt, you must set c = -1 when calling DoInit. See "Initializations" topic in "Startup" menu for an explanation. • Level 2: Adding Modeless ViewIt Windows If you are also interested in working with modeless ViewIt windows, and in taking advantage of features provided by FaceIt, then also read the first few topics in the FaceIt Guide: "Introduction", "Initializations", and "The Main Loop". Many purchasers of ViewIt make use of FaceIt to do their event handling since it can dramatically simplify their source and does all or most of the work done by competing object libraries, or the voluminous code produced by program generators. • Level 3: Mixing Window Types If you wish to use modeless ViewIt windows within programs that already have their own windows and event loops, then read the "Hybrid Programs" topic in the FaceIt Guide. This topic describes a streamlined version of FaceIt ("FaceStub") that can be used to mix ViewIt modeless windows with other windows in an existing program, giving you the best of both worlds. (FaceStub, for example, is used by HyperFace.) 7. Study The vDemo Source Code While reading the programming-related ViewIt and FaceIt topics, study the source code of this vDemoXY program. The "Open Modal ViewIt Window" button at the bottom of this window opens a modal window that contains a description of this source. A second set of programs named fDemoXY is also shipped with ViewIt to illustrate the use of advanced FaceIt features.